#ifndef MQSERVER_H_
#define MQSERVER_H_

#include "../databaseADT/databaseADT.h"
void * waitPckMQ (void * ptr);

int mainMQ (void);
void * listenPubMQ (void * paramsMQ);

void readCommandsMQ(void);


void salirMQ(char * param);

int addnameMQ (int cliID, char * name);
void adddirMQ (char * dir, char * priv);
void removedirMQ (char * dir, char * priv);
void listdirsMQ (char * priv, int cliID);
void closesessMQ (char * priv);

void getparamsMQ (char * full, char * params, char * priv);
int sndlistMQ (int mqid, int servID, int cliID);

void rcvCommitMQ (char * params, char * priv);
int srv_commitMQ (int servID, int cliID, char * path, int type);

void endCiclesMQ (int signo);

int canCommittMQ(char * msg);
void closeAllMQ(void);
void sighandLCMQ(int signo);
int rcv_data_MQbl (int mqid, int mqtype, char * r_msg);

#endif /*MQSERVER_H_*/
